import Vue from "vue";
import VueRouter from "vue-router";
import d1 from "@/views/d1.vue";
import NotFound from "@/views/NotFound.vue";
import shab1 from "@/views/shab1.vue";
import Home from "@/views/Home.vue";
import student from "@/views/student.vue";
//安装注册
Vue.use(VueRouter);

const routes =[
    //路径/重定向/d1
    {
        path: "/",
        redirect:"/student"
    },
    
    {
        path: "/student",
        component: student
    },

    //所有定义之外的界面显示notfound
    {
        path: "*", //匹配上述两条规则之外的所有路径
        component: NotFound
    }

]
//创建对象
const router= new VueRouter({
    routes:routes
});


//导出模块
export default router;